package com.im.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.im.entity.ImPrivateMessage;
import com.im.entity.vo.ImPrivateMessageVO;
import com.im.entity.vo.MessageStrategyVO;
import com.im.grpc.ChatMessageProto;
import com.im.grpc.chat.PrivateChatMessage;
import com.im.utils.page.ConditionDTO;
import com.im.utils.page.PageResult;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author im
 * @since 2025-01-30
 */
public interface IImPrivateMessageService extends IService<ImPrivateMessage> {

    List<ImPrivateMessage> pull(Long sessionId);

    //消息保存+会话更新+消息推送
    PrivateChatMessage saveMessageAndSessionUpdateAndSendMessage(PrivateChatMessage privateChatMessage);

    PageResult<ImPrivateMessageVO> pullPage(ConditionDTO conditionDTO);

    /**
     * 消息策略
     * @param bodyData
     * @return
     */
    MessageStrategyVO messageStrategy(PrivateChatMessage bodyData);
}
